#ifndef CHEMNITZ_SOCKET_H
#define CHEMNITZ_SOCKET_H

#include <stdlib.h>
#include <stdint.h>
#include <stdbool.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
#include <stdio.h>
#include <string.h>

typedef /*@abstract@*/ int *CHEMNITZ_SOCKET;

/*@null@*/ CHEMNITZ_SOCKET chemnitz_socket_open (void);

/*@falsewhennull@*/ bool chemnitz_socket_is_open (CHEMNITZ_SOCKET socket) /*@*/;

size_t chemnitz_socket_read (/*@notnull@*/ CHEMNITZ_SOCKET socket, /*@out@*/ uint8_t *buffer, size_t count)
	/*@modifies buffer@*/;

void chemnitz_socket_close (/*@only@*/ /*@out@*/ /*@null@*/ CHEMNITZ_SOCKET socket);

#endif

